import moment from 'moment'

// 设置中文
moment.locale('zh-cn')

/**
 * 处理日期, 返回多少月之前
 */
export const timeAgo = (targetTime) => {
  return moment(targetTime).fromNow()
}
